<?php

if ($_SERVER['SERVER_NAME'] != 'www.damcuoicuatui.com') {
	if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
		header('Location: http://www.damcuoicuatui.com/?' . $_SERVER['QUERY_STRING']);
	} else {
		header('Location: http://www.damcuoicuatui.com/trang-chu');
	}
}

if (!get_magic_quotes_gpc()) {
	$_GET = array_map('addslashes', $_GET);
	$_POST = array_map('addslashes', $_POST);
	$_COOKIE = array_map('addslashes', $_COOKIE);
	$_REQUEST = array_map('addslashes', $_REQUEST);
}
session_start();
$v_sval = false;

include 'label.php';
include 'const.php';
include 'connect.php';
ob_start();
include 'functions/index.php';
createDifineSystemParameter();
date_default_timezone_set('Asia/Saigon');

$a = (isset($_REQUEST['a'])) ? $_REQUEST['a'] : '';

if ($a == 'LO') {
	unset($_SESSION);
	setcookie('logindata', '/');
	session_destroy();
	redir(URL . 'trang-chu');
	exit;
}

switch ($a) {
	case 'LI';
		include 'login/index.php';
		break;
	case 'ACC';
		include 'account/index.php';
		break;
	case 'CONT';
		include 'contact/index.php';
		break;
	case 'REGI';
		include 'register/index.php';
		break;
	case "LOGI";
		include "login/index.php";
		break;
	case "DISP";
		include 'display/index.php';
		break;
	case 'MEMB';
		include 'member/index.php';
		break;
	default;
		$v_title = _LB_ROOT_PATH . ' - ' . _LB_HOME_PATH;
		include 'header.php';
		include 'home.php';
		include 'footer.php';
		break;
}
?>